package cn.wp.ewallet.common.service.impl;


import cn.wp.common.core.dto.WpResult;
import cn.wp.common.core.util.BeanUtil;
import cn.wp.ewallet.common.dao.DocContentDao;
import cn.wp.ewallet.common.model.dto.DocContentDto;
import cn.wp.ewallet.common.model.entity.DocContentDo;
import cn.wp.ewallet.common.service.DocContentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DocContentServiceImpl implements DocContentService {

    @Autowired
    private DocContentDao docContentDao;

    @Override
    public WpResult getServiceInfoListByType(String type, String langCode) {
        DocContentDo docContentDo = docContentDao.selectServiceInfoListByType(type, langCode);
        DocContentDto docContentDto = BeanUtil.copyProperties(docContentDo, DocContentDto.class);
        return new WpResult().success(docContentDto);
    }

    @Override
    public List<DocContentDo> getFinaProdInfoRoleByfinaProdId(String finaProdId, String langCode) {
        List<DocContentDo> docContentDoList = docContentDao.selectFinaProdInfoRoleByfinaProdId(finaProdId, langCode);
        return docContentDoList;
    }


}
